package com.study.thread;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.stream.IntStream;

@Data
public class MyThread2  extends Thread{
    private String name;

    public MyThread2(String name){
        this.name = name;
    }
    @Override
    public void run() {
        IntStream.range(0,10).forEach(i -> {
            System.out.println(this.name + ":===>"+i+"\t"+ DateUtil.now());
        });
    }
}
